package com.yundasys.lab12java.concurrent;

import java.util.concurrent.CompletableFuture;

/**
 * @PACKAGE_NAME: com.yundasys.lab12java.concurrent
 * @NAME: CompletableFutureTest2
 * @USER: jiangta
 * @DATE: 2022/11/7
 * @TIME: 10:13 上午
 * @PROJECT_NAME: springboot-labs
 */
public class CompletableFutureTest2 {

    public static void main(String[] args) {

        CompletableFuture<Integer> fl = CompletableFuture.supplyAsync(()->{
            int i = 1/0;
            return i;
        });
        CompletableFuture.allOf(fl).join();
    }
}
